/*
 * ListaDiretorView
 * 
 * Versão 1.0
 * 
 * Data de criação: 27/05/2013
 * 
 * Copyright (c)
 * Autor: Odair José Tanes
 * Matrícula: 2009209186
 * Disciplina: Projeto de Sistemas de Software
 * 
 * Protótipo criado para exercício da disciplina
 * 
 */

package edu.ufes.pss.exercicioSwingBanco.view;

import javax.swing.JOptionPane;

/**
 * Tela para visualização de todas os diretores
 * 
 * @author OdairJT
 */

public class ListaDiretorView extends javax.swing.JFrame {    
    
    /**
     * Creates new form TelaAgencia
     */
    
    public ListaDiretorView() {
        initComponents();        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        scrPaneTabela = new javax.swing.JScrollPane();
        tblDiretores = new javax.swing.JTable();
        pnlBarraBotoes = new javax.swing.JPanel();
        btnNovo = new javax.swing.JButton();
        btnVisualizar = new javax.swing.JButton();
        btnExcluir = new javax.swing.JButton();
        btnFechar = new javax.swing.JButton();
        btnRecarregar = new javax.swing.JButton();
        btnDefinirDiretorRegionalAgencia = new javax.swing.JButton();
        txtFiltrar = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("DIRETORES");
        setResizable(false);

        tblDiretores.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "NOME", "CPF", "DATA DE ANIVERSÁRIO", "E-MAIL"
            }
        ));
        scrPaneTabela.setViewportView(tblDiretores);

        pnlBarraBotoes.setBackground(new java.awt.Color(204, 204, 204));

        btnNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/NewImagem.gif"))); // NOI18N
        btnNovo.setText("Novo");

        btnVisualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/viewImagem.png"))); // NOI18N
        btnVisualizar.setText("Visualizar");

        btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/DeleteImagem.gif"))); // NOI18N
        btnExcluir.setText("Excluir");

        btnFechar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/CancelImagem.gif"))); // NOI18N
        btnFechar.setText("Fechar");

        btnRecarregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/reloadImagem.jpeg"))); // NOI18N
        btnRecarregar.setText("Recarregar");

        btnDefinirDiretorRegionalAgencia.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/gerenteRegionalImagem.jpg"))); // NOI18N
        btnDefinirDiretorRegionalAgencia.setText("Definir Regionais");

        org.jdesktop.layout.GroupLayout pnlBarraBotoesLayout = new org.jdesktop.layout.GroupLayout(pnlBarraBotoes);
        pnlBarraBotoes.setLayout(pnlBarraBotoesLayout);
        pnlBarraBotoesLayout.setHorizontalGroup(
            pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, pnlBarraBotoesLayout.createSequentialGroup()
                .addContainerGap()
                .add(btnNovo)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btnDefinirDiretorRegionalAgencia)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(btnRecarregar)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btnVisualizar)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btnExcluir)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btnFechar)
                .addContainerGap())
        );
        pnlBarraBotoesLayout.setVerticalGroup(
            pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlBarraBotoesLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btnNovo)
                    .add(btnVisualizar)
                    .add(btnExcluir)
                    .add(btnFechar)
                    .add(btnRecarregar)
                    .add(btnDefinirDiretorRegionalAgencia))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        txtFiltrar.setText("Filtrar");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlBarraBotoes, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .add(scrPaneTabela, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 971, Short.MAX_VALUE)
            .add(txtFiltrar)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(txtFiltrar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(scrPaneTabela, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 462, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(pnlBarraBotoes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnDefinirDiretorRegionalAgencia;
    private javax.swing.JButton btnExcluir;
    private javax.swing.JButton btnFechar;
    private javax.swing.JButton btnNovo;
    private javax.swing.JButton btnRecarregar;
    private javax.swing.JButton btnVisualizar;
    private javax.swing.JPanel pnlBarraBotoes;
    private javax.swing.JScrollPane scrPaneTabela;
    private javax.swing.JTable tblDiretores;
    private javax.swing.JTextField txtFiltrar;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the btnEditar
     */
    public javax.swing.JButton getBtnVisualizar() {
        return btnVisualizar;
    }

    /**
     * @return the btnExcluir
     */
    public javax.swing.JButton getBtnExcluir() {
        return btnExcluir;
    }

    /**
     * @return the btnFechar
     */
    public javax.swing.JButton getBtnFechar() {
        return btnFechar;
    }

    /**
     * @return the btnNova
     */
    public javax.swing.JButton getBtnNova() {
        return btnNovo;
    }

    /**
     * @return the tblAgencias
     */
    public javax.swing.JTable getTblDiretores() {
        return tblDiretores;
    }
    
    /**
     * @return the btnRecarregar
     */
    public javax.swing.JButton getBtnRecarregar() {
        return btnRecarregar;
    }
    
    /**
     * @return the txtFiltrar
     */
    public javax.swing.JTextField getTxtFiltrar() {
        return txtFiltrar;
    }    

    /**
     * @return the btnDefinirDiretorRegionalAgencia
     */
    public javax.swing.JButton getBtnDefinirDiretorRegionalAgencia() {
        return btnDefinirDiretorRegionalAgencia;
    }
    
    public void showMessage(String pMessage){
        JOptionPane.showMessageDialog(this, pMessage);
    }
    
    public int showConfirmMessage(String pTitulo, String pMessage){
        return JOptionPane.showConfirmDialog(this, pMessage, pTitulo, JOptionPane.YES_NO_OPTION);
    }
}
